<template>
  <div class="app-container">
    <!--表格渲染-->
    <el-table ref="table" v-loading="crud.loading" :height="500" border :data="crud.data" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
      <el-table-column type="selection" width="50" />
      <el-table-column :show-overflow-tooltip="true" prop="bookName" label="书籍名称" />
      <el-table-column :show-overflow-tooltip="true" prop="articleLink" label="书籍链接" />
      <el-table-column :show-overflow-tooltip="true" prop="author" label="作者" />
      <el-table-column :show-overflow-tooltip="true" prop="keywords" label="关键词" />
      <el-table-column :show-overflow-tooltip="true" label="添加时间" align="center" prop="createdAt" />
      <el-table-column :show-overflow-tooltip="true" label="更新时间" align="center" prop="updatedAt" />
    </el-table>
    <pagination />
  </div>
</template>

<script>
import crudBook from '@/api/book'
import CRUD, { presenter, header, crud } from '@crud/crud'
import pagination from '@crud/Pagination'
export default {
  name: 'Project',
  components: { pagination },
  cruds() {
    return CRUD({ title: '书单', url: 'api/book', crudMethod: { ...crudBook }})
  },
  mixins: [presenter(), header(), crud()],
  data() {
  },
  created() {
  },
  methods: {
    sendSelectBooks() {
      this.$emit('sendBooks', this.crud.selections)
    }
  }
}
</script>

    <style rel="stylesheet/scss" lang="scss" scoped>

    </style>

